package com.jwj.service.impl;

import com.jwj.Dao.UserDao;
import com.jwj.pojo.Account;
import com.jwj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public List<Account> loginAll() {
        return userDao.loginAll();
    }

    @Override
    public Account loginOne(String username) {
        return userDao.loginOne(username);
    }


    @Override
    public Account loginOneId(int account_id) {
        return userDao.loginOneId(account_id);
    }


    @Override
    public void addLogin(Account account) {
        userDao.addLogin(account);
    }

    @Override
    public void deleteLogin(int account_id) {
        userDao.deleteLogin(account_id);
    }

    @Override
    public void updateLogin(Account account) {
        userDao.updateLogin(account);
    }
}
